home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Online / SpeakFreely / src / libdes / Makefile < prev    next >
Makefile  |  2000-05-18  |  5KB  |  150 lines

  1. # You must select the correct terminal control system to be used to
  2. # turn character echo off when reading passwords.  There a 5 systems
  3. # SGTTY   - the old BSD system
  4. # TERMIO  - most system V boxes
  5. # TERMIOS - SGI (ala IRIX).
  6. # VMS      - the DEC operating system
  7. # MSDOS   - we all know what it is :-)
  8. # read_pwd.c makes a reasonable guess at what is correct.
  9.  
  10. OPTS0= -DRAND # -DTERMIO -DNOCONST
  11.  
  12. # Version 1.94 has changed the strings_to_key function so that it is
  13. # now compatible with MITs when the string is longer than 8 characters.
  14. # If you wish to keep the old version, uncomment the following line.
  15. # This will affect the -E/-D options on des(1).
  16. #OPTS1= -DOLD_STR_TO_KEY
  17.  
  18. # This #define specifies the use of an alternative D_ENCRYPT macro in
  19. # ecb_encrypt.    The choice of macro can make a %20 difference in the
  20. # speed.  Unfortunatly the choise of the best macro appears to be very
  21. # dependant on the compiler and the machine in question.
  22. # For the following combinations use the ALT_ECB option.
  23. # Sparc 2 (cc -O4), sun 3/260 (cc -O4)
  24. # For the following combinations do not use the ALT_ECB option.
  25. # Sparc 2 (gcc2 -O2), sun 3/260 (cc -O2), mvax2 (cc -O), MSDOS (Turbo Cv2)
  26. # For other machines, experiment with changing the option and run
  27. # ./speed to see which is faster.
  28. # DO NOT TURN THIS OPTION ON WHEN COMPILING THIS CODE ON A 64 BIT MACHINE
  29. #OPTS2= -DDES_USE_PTR
  30.  
  31. OPTS= $(OPTS0) $(OPTS1) $(OPTS2)
  32.  
  33. CC=cc
  34. CFLAGS= -O $(OPTS) $(CFLAG)
  35.  
  36. #CC=gcc
  37. #CFLAGS= -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)
  38.  
  39. LIBDIR=/usr/local/lib
  40. BINDIR=/usr/local/bin
  41. INCDIR=/usr/local/include
  42. MANDIR=/usr/local/man
  43. MAN1=1
  44. MAN3=3
  45. SHELL=/bin/sh
  46. OBJS=    cbc3_enc.o cbc_cksm.o cbc_enc.o ncbc_enc.o pcbc_enc.o qud_cksm.o \
  47.     cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o ecb_enc.o  ede_enc.o  \
  48.     enc_read.o enc_writ.o fcrypt.o    ofb64ede.o ofb64enc.o ofb_enc.o  \
  49.     rand_key.o          set_key.o rpc_enc.o  str2key.o supp.o
  50.  
  51. GENERAL=COPYRIGHT FILES INSTALL Imakefile README VERSION Makefile \
  52.     times vms.com KERBEROS MODES.DES  GNUmakefile des.man \
  53.     DES.pm DES.pod DES.xs Makefile.PL Makefile.uni typemap t \
  54.     des_crypt.man Makefile.ssl des.doc makefile.bc
  55. DES=    des.c
  56. #TESTING=destest.c speed.c rpw.c
  57. HEADERS=version.h des.h des_locl.h podd.h sk.h spr.h rpc_des.h
  58. LIBDES= cbc3_enc.c cbc_cksm.c cbc_enc.c ncbc_enc.c pcbc_enc.c qud_cksm.c \
  59.     cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c ecb_enc.c  ede_enc.c  \
  60.     enc_read.c enc_writ.c fcrypt.c    ofb64ede.c ofb64enc.c ofb_enc.c  \
  61.     rand_key.c          set_key.c rpc_enc.c  str2key.c  supp.c
  62.  
  63. PERL=    des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl
  64.  
  65. ALL=    $(GENERAL) $(DES) $(TESTING) $(LIBDES) $(PERL) $(HEADERS)
  66.  
  67. DLIB=    libdes.a
  68.  
  69. all: $(DLIB) # destest rpw des speed
  70.  
  71. test:    all
  72.     ./destest
  73.  
  74. $(DLIB): $(OBJS)
  75.     /bin/rm -f $(DLIB)
  76.     ar cr $(DLIB) $(OBJS)
  77.     -if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \
  78.     else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \
  79.     else exit 0; fi; fi
  80.  
  81. destest: destest.o libdes.a
  82.     $(CC) $(CFLAGS) -o destest destest.o libdes.a
  83.  
  84. rpw: rpw.o libdes.a
  85.     $(CC) $(CFLAGS) -o rpw rpw.o libdes.a
  86.  
  87. speed: speed.o libdes.a
  88.     $(CC) $(CFLAGS) -o speed speed.o libdes.a
  89.  
  90. des: des.o libdes.a
  91.     $(CC) $(CFLAGS) -o des des.o libdes.a
  92.  
  93. tags:
  94.     ctags $(DES) $(TESTING) $(LIBDES)
  95.  
  96. tar:
  97.     tar chf libdes.tar $(ALL)
  98.  
  99. shar:
  100.     shar $(ALL) >libdes.shar
  101.  
  102. depend:
  103.     makedepend $(LIBDES) $(DES) $(TESTING)
  104.  
  105. clean:
  106.     /bin/rm -f *.o tags core rpw destest des speed $(DLIB) .nfs* *.old \
  107.     *.bak destest rpw des speed
  108.  
  109. dclean:
  110.     sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
  111.     mv -f Makefile.new Makefile
  112.  
  113. # Eric is probably going to choke when he next looks at this --tjh
  114. install: $(DLIB) des
  115.     if test $(INSTALLTOP); then \
  116.         echo SSL style install; \
  117.         cp $(DLIB) $(INSTALLTOP)/lib; \
  118.         if test -s /bin/ranlib; then \
  119.         /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
  120.         else \
  121.         if test -s /usr/bin/ranlib; then \
  122.         /usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \
  123.         fi; fi; \
  124.         chmod 644 $(INSTALLTOP)/lib/$(DLIB); \
  125.         cp des.h $(INSTALLTOP)/include; \
  126.         chmod 644 $(INSTALLTOP)/include/des.h; \
  127.         cp des $(INSTALLTOP)/bin; \
  128.         chmod 755 $(INSTALLTOP)/bin/des; \
  129.     else \
  130.         echo Standalone install; \
  131.         cp $(DLIB) $(LIBDIR)/$(DLIB); \
  132.         if test -s /bin/ranlib; then \
  133.           /bin/ranlib $(LIBDIR)/$(DLIB); \
  134.         else \
  135.           if test -s /usr/bin/ranlib; then \
  136.         /usr/bin/ranlib $(LIBDIR)/$(DLIB); \
  137.           fi; \
  138.         fi; \
  139.         chmod 644 $(LIBDIR)/$(DLIB); \
  140.         cp des $(BINDIR)/des; \
  141.         chmod 711 $(BINDIR)/des; \
  142.         cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
  143.         chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
  144.         cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
  145.         chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
  146.         cp des.h $(INCDIR)/des.h; \
  147.         chmod 644 $(INCDIR)/des.h; \
  148.     fi
  149. # DO NOT DELETE THIS LINE -- make depend depends on it.
  150.